﻿using System.Threading.Tasks;
using KL.UFrame.Data.Entities;

namespace KL.UFrame.Data.Business.Account
{
    /// <summary>
    /// oauth管理接口
    /// </summary>
    public interface IOAuthBusiness
    {
        /// <summary>
        /// 添加一个oauth客户端
        /// </summary>
        /// <param name="client"></param>
        /// <returns>客户端Id</returns>
        Task<string> CreateClientAsync(OAuthClient client);

        /// <summary>
        /// 通过客户端Id和Secret查找
        /// </summary>
        /// <param name="id"></param>
        /// <param name="secret"></param>
        /// <returns></returns>
        Task<OAuthClient> FindAsync(string id, string secret);

    }
}